package cn.lds.j368.dsbank.service.impl;

import cn.lds.j368.dsbank.domain.ProvinceCityDistrict;
import cn.lds.j368.dsbank.mapper.ProvinceCityDistrictMapper;
import cn.lds.j368.dsbank.service.ProvinceCityDistrictService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProvinceCityDistrictServiceImpl implements ProvinceCityDistrictService {

    @Autowired
    private ProvinceCityDistrictMapper provinceCityDistrictMapper;
    @Override
    public List<ProvinceCityDistrict> selectPCDAllByPid(Integer pId) {

        QueryWrapper<ProvinceCityDistrict> pcdQueuryWrapper = new QueryWrapper<>(new ProvinceCityDistrict()).eq("pid",pId);

        List<ProvinceCityDistrict> provinceCityDistricts = provinceCityDistrictMapper.selectList(pcdQueuryWrapper);


        return provinceCityDistricts;
    }
}
